package com.sunda.spmsweb.wmscontroller;


import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmswms.service.IWhsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 仓库信息表 前端控制器
 * </p>
 *
 * @author Wayne
 * @since 2020-11-24
 */
@RestController
@RequestMapping("/whs")
@Api(tags = "仓库基本信息", description = "仓库基本信息接口")
public class WhsController {

    @Autowired
    IWhsService iWhsService;

    @RequestMapping("/getWerksList")
    @ApiOperation(value = "获取全部仓库信息",notes = "获取全部仓库信息", httpMethod = "GET")
    public ResponseResult getWhsList(){
        try {
            return ResponseResult.success().add("whsList", iWhsService.getWhsList());
        }catch (Exception e){
            e.printStackTrace();
            return ResponseResult.error("获取仓库信息出错");
        }
    }
}
